<!DOCTYPE html>
<html th:fragment="layout(template)" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Api mock</title>
    <script type="text/javascript" src="/static/js/jquery-3.3.1.min.js" th:src="@{/js/jquery-3.3.1.min.js}"></script>
    <script src="/static/js/common.js" th:src="@{/js/common.js}+ '?v=201812182150'"></script>
    <script type="text/javascript" src="/static/js/index.js" th:src="@{/js/index.js}+ '?v=201812182150'"></script>
</head>
<body>
    <h3 align="center">api列表，点击可获取测试数据</h3>
    每页记录数 ：<input type="text" id="pageSize" value="5"/>
    &nbsp;&nbsp;
    <a href="javascript:apiPost('getPostList');">获取帖子列表</a>
    <br/>
    <hr/>
    帖子ID ：<input type="text" id="whereFieldValue" value="spring-boot-bbs-api-9"/>
    用户ID ：<input type="text" id="userIdForPostItem" value="spring-boot-bbs-api-3"/>
    &nbsp;&nbsp;
    <a href="javascript:apiPost('getPostByPrimaryKey');">获取帖子详情</a>
    <br/>
    <hr/>
    每页记录数 ：<input type="text" id="pageSizeForComment" value="5"/>
    帖子ID：<input type="text" id="postID" value="1"/>
    &nbsp;&nbsp;
    <a href="javascript:apiPost('getCommentList');">获取评论列表</a>
    <br/>
    <hr/>
    <hr/>
    用户ID ：<input type="text" id="userId" value="spring-boot-bbs-api-3"/>
    帖子ID：<input type="text" id="postIDForStarOrPraise" value="spring-boot-bbs-api-2"/>
    &nbsp;&nbsp;
    <a href="javascript:userStarAndPraise('userStarAndPraiseInsert', 1);">收藏</a>
    <a href="javascript:userStarAndPraise('userStarAndPraiseInsert', 2);">点赞</a>
    <a href="javascript:userStarAndPraise('userStarAndPraiseDelete', 1);">取消收藏</a>
    <a href="javascript:userStarAndPraise('userStarAndPraiseDelete', 2);">取消点赞</a>
    <br/>
    <div style="color:red;" id="divResult"></div>
    <hr/>
    <textarea rows="30" cols="256" id="txtJsonResult"></textarea>
    <hr/>
    <a href="https://www.json.cn" target="_blank">JSON 在线解析及格式化验证</a>
</body>
</html>